
class Student {
    private int age;
    public String name;
    public static String classes = "110"; //类名.classes = some num;

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void print() {
        System.out.println("姓名" + name + "年龄" + age);
    }

    public void setName(String name) {
        this.name = name;
    }

    public static void func() { //静态方法 不能直接访问非静态数据成员和方法 方法区

    }//类名.func()
}
public class Test {
    public static void main() {
        Student1 student = new Student1();
        demo1.Test test = new demo1.Test();//new 另一包 src—>demo1

        Student.classes = "java";
        Student.func();

    }
}
